Skip to content

feat(list_reservations): lock in expires_*/finalized_* window passthrough (0.4.3)#67

Merged
amavashev merged 1 commit into
mainfrom
feat/list-reservations-expires-finalized-filters
May 22, 2026
Merged

feat(list_reservations): lock in expires_*/finalized_* window passthrough (0.4.3)#67
amavashev merged 1 commit into
mainfrom
feat/list-reservations-expires-finalized-filters

Conversation

@amavashev
Copy link
Copy Markdown
Contributor

Summary

Client-side companion to cycles-protocol-v0.yaml revision 2026-05-22 and cycles-server#163 (the v0.1.25.21 release). Closes the Python-client side of runcycles/cycles-server#162. Follow-up to v0.4.2 (which shipped the from/to window) with the same shape, just four more params.

What this PR does

  • Adds sync + async regression tests for list_reservations confirming the four new ISO-8601 window params are forwarded byte-exactly to the URL query string. The existing **query_params: str signature already accepts them — the tests pin the contract.
  • Bumps to 0.4.3.
  • Updates AUDIT.md and CHANGELOG.md.

No production code change.

Call-site syntax

Unlike from (a Python reserved keyword that required dict-unpack **{"from": ...} in v0.4.2), the new param names are plain kwargs:

client.list_reservations(
    tenant="acme",
    expires_from="2026-05-22T00:00:00Z",
    expires_to="2026-05-23T00:00:00Z",
    finalized_from="2026-05-15T00:00:00Z",
    finalized_to="2026-05-22T00:00:00Z",
)

Verification

  • pytest: 393 passed, 5 skipped.
  • pytest --cov=runcycles: 100% coverage (gate ≥95% per CLAUDE.md).

Test plan

  • CI green
  • (After merge) optional smoke against a v0.1.25.21 cycles-server

Closes the Python-client side of the issue cluster for runcycles/cycles-server#162.

…ough (0.4.3)

Client-side companion to cycles-protocol-v0.yaml revision 2026-05-22
(runcycles/cycles-protocol#98) and runcycles/cycles-server#163.
Closes the Python-client side of issue #162.

The existing `list_reservations(**query_params: str)` signature
already forwards arbitrary kwargs to the URL query string, so the
four new ISO 8601 date-time params (expires_from / expires_to /
finalized_from / finalized_to) work over the wire today without a
code change. This commit adds sync + async regression tests that
pin the contract — future tightening of the kwargs signature
cannot drop the new params silently.

Unlike `from` (a Python reserved keyword), the new param names
are plain kwargs:

  client.list_reservations(
      tenant="acme",
      expires_from="2026-05-22T00:00:00Z",
      expires_to="2026-05-23T00:00:00Z",
      finalized_from="2026-05-15T00:00:00Z",
      finalized_to="2026-05-22T00:00:00Z",
  )

No protocol or wire-format change; servers older than v0.1.25.21
silently ignore the new params per the additive-parameter guarantee
in cycles-protocol-v0.yaml. 393 tests pass at 100% coverage.

Bumped to 0.4.3, updated AUDIT.md and CHANGELOG.md.
@amavashev amavashev merged commit 08e3ce0 into main May 22, 2026
7 checks passed
@amavashev amavashev deleted the feat/list-reservations-expires-finalized-filters branch May 22, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant